package com.yz.newspaper.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yz.newspaper.pojo.po.ContractSigning;
import com.yz.newspaper.mapper.ContractSigningMapper;
import com.yz.newspaper.pojo.po.EndUserScore;
import com.yz.newspaper.pojo.unitPo.PageBean;
import com.yz.newspaper.service.IContractSigningService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 合同签约 服务实现类
 * </p>
 *
 * @author author
 * @since 2024-05-04
 */
@Service
public class ContractSigningServiceImpl extends ServiceImpl<ContractSigningMapper, ContractSigning> implements IContractSigningService {

    @Override
    public PageBean getList(String partyA, String username, Integer year, Integer month, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<ContractSigning> list = baseMapper.getList(partyA, username, year, month);
        PageInfo<ContractSigning> pageInfo = new PageInfo<>(list);
        return new PageBean(pageInfo.getList(), pageInfo.getTotal());
    }
}
